package trabalho.das.fxml.views;

import java.io.IOException;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.Accordion;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.VBox;
import trabalho.das.fxml.views.controladores.ControladorMainView;
import trabalho.das.fxml.views.uicomponents.CanvasGrid;
import trabalho.das.fxml.views.uicomponents.InformacoesTelha;

/**
 * Trabalho DAS - 2014/2015
 * @author a21210380, a21190325, a21210392
 */
public class MainView extends BorderPane {
    ControladorMainView controlador;
    
    public MainView() {
        controlador = new ControladorMainView(this);
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/resources/fxml/MainView.fxml"));
        fxmlLoader.setRoot(this);
        fxmlLoader.setController(controlador);
        
        try {
            fxmlLoader.load();
            setCenter(new CanvasGrid(controlador));
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        }
    }
}
